package com.xoa.model.workflow;

import com.xoa.model.users.Users;
import com.xoa.util.DateFormat;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class FlowRunPrcs {
    /**
     * 主键ID
     **/
    protected int id;
    /**
     * 公文ID
     **/
    protected int docId;
    /**
     * 流程实例ID
     **/
    protected int runId;
    /**
     * 流程实例步骤ID
     **/
    protected int prcsId;
    /**
     * 用户ID
     **/
    protected String userId;
    /**
     * 工作接收时间
     **/
    protected String prcsTime;
    /**
     * 工作转交/办结时间
     **/
    protected String deliverTime;
    /**
     * 步骤状态(1-未接收,2-办理中,3-转交下一步，下一步经办人无人接收,4-已办结,5-自由流程预设步骤,6-已挂起,)
     **/
    protected String prcsFlag;
    /**
     * 步骤ID[设计流程中的步骤号]
     **/
    protected int flowPrcs;
    /**
     * 是否主办(0-经办,1-主办)
     **/
    protected String opFlag;
    /**
     * 主办人选项(0-指定主办人,1-先接收者主办,2-无主办人会签,)
     **/
    protected String topFlag;
    /**
     * 上一步流程FLOW_PRCS
     **/
    protected String parent;
    /**
     * 子流程的流程实例ID
     **/
    protected int childRun;
    /**
     * 待定
     **/
    protected String timeOut;
    /**
     * 步骤可写字段[仅自由流程且只有主办人生效]
     **/
    protected String freeItem;
    /**
     * 待定
     **/
    protected String timeOutTemp;
    /**
     * 工作委托用户ID串
     **/
    protected String otherUser;
    /**
     * 是否超时(1-超时,其他-不超时)
     **/
    protected String timeOutFlag;
    /**
     * 工作创建时间
     **/
    protected String createTime;
    /**
     * 工作移交用户ID
     **/
    protected String fromUser;
    /**
     * 取消挂起的时间
     **/
    protected String activeTime;
    /**
     * 批注
     **/
    protected String comment;
    /**
     * 超时统计查询增加部门
     **/
    protected int prcsDept;
    /**
     * 上一步流程PRCS_ID
     **/
    protected String parentPrcsId;
    /**
     * 返回步骤PRCS_ID标志
     **/
    protected int backPrcsId;
    /**
     * 返回步骤FLOW_PRCS标志
     **/
    protected int backFlowPrcs;
    /**
     * 是否排除工作时段按排班类型(0-否,1-是)
     **/
    protected Object timeOutAttend;
    /**
     * 超时计算方法(0-本步骤接收后开始计时,1-上一步骤转交后开始计时 )
     **/
    protected Integer timeOutType;
    /**
     *
     **/
    protected String runPrcsName;
    /**
     *
     **/
    protected String runPrcsId;
    /**
     * 是否是移动端操作(0-否,1-是)
     **/
    protected Integer mobileFlag;
    /**
     * 是否催办
     **/
    protected int isRemind;
    /**
     * 区分自由流程回收的是预设步骤还是普通流转步骤，1-普通流转步骤，5-预设步骤
     **/
    protected Integer tempPrcsFlag;
    /**
     * 工作天数换算方式(0-24小时为一天，1-按个人排班类型工作时长为一天)
     **/
    protected String workingdaysType;

    protected String branchCount;//并发数量

    protected List<FlowRunPrcs> flowStep;

    protected String readType;

    /*临时封装字段，代办流程*/
    private String listFldsStr;

    private String  formId;

    private String flowTypes;

    private String ATTACH_PRIV; //权限附件控制

    private String prcsTo; //下一步骤

    public String getListFldsStr() {
        return listFldsStr;
    }

    public void setListFldsStr(String listFldsStr) {
        this.listFldsStr = listFldsStr;
    }

    public String getFormId() {
        return formId;
    }

    public void setFormId(String formId) {
        this.formId = formId;
    }

    public String getFlowTypes() {
        return flowTypes;
    }

    public void setFlowTypes(String flowTypes) {
        this.flowTypes = flowTypes;
    }

    public String getATTACH_PRIV() {
        return ATTACH_PRIV;
    }

    public void setATTACH_PRIV(String ATTACH_PRIV) {
        this.ATTACH_PRIV = ATTACH_PRIV;
    }

    public String getPrcsTo() {
        return prcsTo;
    }

    public void setPrcsTo(String prcsTo) {
        this.prcsTo = prcsTo;
    }

    /**
     * 发起人姓名
     */
    protected String userName;

    private String chuan;//是否传阅 0 不传 1 传
    /**
     * 创建作者:   张勇
     * 创建日期:   2017/5/25 14:04
     * 方法介绍:   一对一关联对象
     * 参数说明:
     *
     * @return
     */
    protected FlowRun flowRun;

    /**
     * 流程设置
     */
    protected FlowTypeModel flowType;

    /**
     * 关联设计流程
     */
    protected FlowProcess flowProcess;

    /**
     * 到达时间
     */
    protected String receiptTime;

    /**
     * 到达停留时间
     */
    protected String arriveTime;

    /**
     * 办理停留时间
     */
    protected String handleTime;

    /**
     * 工作接收时间自定义参数
     */
    private String receive;

    /**
     * 列表查询条件
     */
    private String myworkconditions;

    private String prcsName;

    private String runName;

    private String flowName;

    private Integer flowId;
    //用户头像
    private String avatar;
    //流程状态
    private String state;

    //状态
    private String state1;

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    //开始时间
    private String beginTime;

    //并发判断
    private String state2;

    //当前步骤
    private String bz;

    //当前经办人
    private String currentPeople;

    //经办步骤
    private String jbbz;

    private Users users;

    public Users getUsers() {
        return users;
    }

    public void setUsers(Users users) {
        this.users = users;
    }

    //用户uid
    private Integer uid;

    private String allowBack;

    private String beginUser;

    private String beginUserName;

    private String endTime;

    private String isHidden;

    private String workLevel;

    private String havaSon;

    // 流程分类类型
    private String sortMainType;

    private String tabId;
    private String tableName;

    private String opaddUser;//加签人

    private String readInfo;//是否有传阅情况

    public String getOpaddUser() {
        return opaddUser;
    }

    public void setOpaddUser(String opaddUser) {
        this.opaddUser = opaddUser;
    }

    public String getTabId() {
        return tabId;
    }

    public void setTabId(String tabId) {
        this.tabId = tabId;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getSortMainType() {
        return sortMainType;
    }

    public void setSortMainType(String sortMainType) {
        this.sortMainType = sortMainType;
    }

    public String getHavaSon() {
        return havaSon;
    }

    public void setHavaSon(String havaSon) {
        this.havaSon = havaSon;
    }

    public String getWorkLevel() {
        return workLevel;
    }

    public void setWorkLevel(String workLevel) {
        this.workLevel = workLevel;
    }

    public String getIsHidden() {
        return isHidden;
    }

    public void setIsHidden(String isHidden) {
        this.isHidden = isHidden;
    }

    public String getBeginUser() {
        return beginUser;
    }

    public void setBeginUser(String beginUser) {
        this.beginUser = beginUser;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getBeginUserName() {
        return beginUserName;
    }

    public void setBeginUserName(String beginUserName) {
        this.beginUserName = beginUserName;
    }

    // 待办或者办结总数
    private Integer counts;

    // 办理类型
    private Integer handleType;
    // 办理状态
    private Map<String,Object> handles;

    public Integer getCounts() {
        return counts;
    }

    public void setCounts(Integer counts) {
        this.counts = counts;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getJbbz() {
        return jbbz;
    }

    public void setJbbz(String jbbz) {
        this.jbbz = jbbz;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public String getCurrentPeople() {
        return currentPeople;
    }

    public void setCurrentPeople(String currentPeople) {
        this.currentPeople = currentPeople;
    }

    public String getState2() {
        return state2;
    }

    public void setState2(String state2) {
        this.state2 = state2;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getState1() {
        return state1;
    }

    public void setState1(String state1) {
        this.state1 = state1;
    }

    public String getAvatar() {
        return avatar == null ? "" : avatar.trim();
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getRunName() {
        return runName;
    }

    public void setRunName(String runName) {
        this.runName = runName;
    }

    public String getFlowName() {
        return flowName;
    }

    public void setFlowName(String flowName) {
        this.flowName = flowName;
    }

    public Integer getFlowId() {
        return flowId;
    }

    public void setFlowId(Integer flowId) {
        this.flowId = flowId;
    }

    public String getPrcsName() {
        return prcsName;
    }

    public void setPrcsName(String prcsName) {
        this.prcsName = prcsName;
    }

    public FlowRun getFlowRun() {
        return flowRun;
    }

    public void setFlowRun(FlowRun flowRun) {
        this.flowRun = flowRun;
    }

    public String getFreeItem() {
        return freeItem == null ? "" : freeItem.trim();
    }

    public void setFreeItem(String freeItem) {
        this.freeItem = freeItem == null ? "" : freeItem.trim();
    }

    public String getOtherUser() {
        return otherUser == null ? "" : otherUser.trim();
    }

    public void setOtherUser(String otherUser) {
        this.otherUser = otherUser == null ? null : otherUser.trim();
    }

    public String getComment() {
        return comment == null ? "" : comment.trim();
    }

    public void setComment(String comment) {
        this.comment = comment == null ? null : comment.trim();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getDocId() {
        return docId;
    }

    public void setDocId(int docId) {
        this.docId = docId;
    }

    public Integer getRunId() {
        return runId;
    }

    public void setRunId(Integer runId) {
        this.runId = runId;
    }

    public Integer getPrcsId() {
        return prcsId;
    }

    public void setPrcsId(Integer prcsId) {
        this.prcsId = prcsId;
    }

    public String getUserId() {
        return userId == null ? "" : userId.trim();
    }

    public void setUserId(String userId) {
        this.userId = userId == null ? null : userId.trim();
    }

    public String getPrcsTime() {
        return prcsTime == null ? DateFormat.getStrTime(-621701856) : prcsTime;
    }

    /**
     * 工作接收时间
     *
     * @param prcsTime
     */
    public void setPrcsTime(String prcsTime) {
        this.prcsTime = prcsTime;
    }

    public String getDeliverTime() {
        return deliverTime == null ? "" : deliverTime.trim();
    }

    /**
     * 工作转交/办结时间
     *
     * @param deliverTime
     */
    public void setDeliverTime(String deliverTime) {
        this.deliverTime = deliverTime;
    }

    public String getPrcsFlag() {
        return prcsFlag == null ? "" : prcsFlag.trim();
    }

    public void setPrcsFlag(String prcsFlag) {
        this.prcsFlag = prcsFlag == null ? null : prcsFlag.trim();
    }

    public Integer getFlowPrcs() {
        return flowPrcs;
    }

    public void setFlowPrcs(Integer flowPrcs) {
        this.flowPrcs = flowPrcs;
    }

    public String getOpFlag() {
        return opFlag == null ? "" : opFlag.trim();
    }

    public void setOpFlag(String opFlag) {
        this.opFlag = opFlag == null ? null : opFlag.trim();
    }

    public String getTopFlag() {
        return topFlag == null ? "" : topFlag.trim();
    }

    public void setTopFlag(String topFlag) {
        this.topFlag = topFlag == null ? null : topFlag.trim();
    }

    public String getParent() {
        return parent == null ? "" : parent.trim();
    }

    public void setParent(String parent) {
        this.parent = parent == null ? null : parent.trim();
    }

    public Integer getChildRun() {
        return childRun;
    }

    public void setChildRun(Integer childRun) {
        this.childRun = childRun;
    }

    public String getTimeOut() {
        return timeOut == null ? "" : timeOut.trim();
    }

    public void setTimeOut(String timeOut) {
        this.timeOut = timeOut == null ? null : timeOut.trim();
    }

    public String getTimeOutTemp() {
        return timeOutTemp == null ? "" : timeOutTemp.trim();
    }

    public void setTimeOutTemp(String timeOutTemp) {
        this.timeOutTemp = timeOutTemp == null ? null : timeOutTemp.trim();
    }

    public String getTimeOutFlag() {
        return timeOutFlag == null ? "" : timeOutFlag.trim();
    }

    public void setTimeOutFlag(String timeOutFlag) {
        this.timeOutFlag = timeOutFlag == null ? null : timeOutFlag.trim();
    }

    public String getCreateTime() {
        return createTime == null ? "" : createTime.trim();
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getFromUser() {
        return fromUser == null ? "" : fromUser.trim();
    }

    public void setFromUser(String fromUser) {
        this.fromUser = fromUser == null ? null : fromUser.trim();
    }

    public String getActiveTime() {
        return activeTime == null ? "" : activeTime.trim();
    }

    public void setActiveTime(String activeTime) {
        this.activeTime = activeTime;
    }

    public Integer getPrcsDept() {
        return prcsDept;
    }

    public void setPrcsDept(Integer prcsDept) {
        this.prcsDept = prcsDept;
    }

    public String getParentPrcsId() {
        return parentPrcsId == null ? "" : parentPrcsId.trim();
    }

    public void setParentPrcsId(String parentPrcsId) {
        this.parentPrcsId = parentPrcsId == null ? null : parentPrcsId.trim();
    }

    public Integer getBackPrcsId() {
        return backPrcsId;
    }

    public void setBackPrcsId(Integer backPrcsId) {
        this.backPrcsId = backPrcsId;
    }

    public Integer getBackFlowPrcs() {
        return backFlowPrcs;
    }

    public void setBackFlowPrcs(Integer backFlowPrcs) {
        this.backFlowPrcs = backFlowPrcs;
    }

    public Object getTimeOutAttend() {
        return timeOutAttend;
    }

    public void setTimeOutAttend(Object timeOutAttend) {
        this.timeOutAttend = timeOutAttend;
    }

    public Integer getTimeOutType() {
        return timeOutType;
    }

    public void setTimeOutType(Integer timeOutType) {
        this.timeOutType = timeOutType;
    }

    public String getRunPrcsName() {
        return runPrcsName == null ? "" : runPrcsName.trim();
    }

    public void setRunPrcsName(String runPrcsName) {
        this.runPrcsName = runPrcsName == null ? null : runPrcsName.trim();
    }

    public String getRunPrcsId() {
        return runPrcsId == null ? "" : runPrcsId.trim();
    }

    public void setRunPrcsId(String runPrcsId) {
        this.runPrcsId = runPrcsId == null ? null : runPrcsId.trim();
    }

    public Integer getMobileFlag() {
        return mobileFlag;
    }

    public void setMobileFlag(Integer mobileFlag) {
        this.mobileFlag = mobileFlag;
    }

    public Integer getIsRemind() {
        return isRemind;
    }

    public void setIsRemind(Integer isRemind) {
        this.isRemind = isRemind;
    }

    public Integer getTempPrcsFlag() {
        return tempPrcsFlag;
    }

    public void setTempPrcsFlag(Integer tempPrcsFlag) {
        this.tempPrcsFlag = tempPrcsFlag;
    }

    public String getWorkingdaysType() {
        return workingdaysType == null ? "" : workingdaysType.trim();
    }

    public void setWorkingdaysType(String workingdaysType) {
        this.workingdaysType = workingdaysType == null ? null : workingdaysType.trim();
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public FlowTypeModel getFlowType() {
        return flowType;
    }

    public void setFlowType(FlowTypeModel flowType) {
        this.flowType = flowType;
    }

    /**
     * 创建作者:   张勇
     * 创建日期:   2017/6/1 14:02
     * 方法介绍:   关联设计流程
     * 参数说明:
     *
     * @return
     */
    public FlowProcess getFlowProcess() {
        return flowProcess;
    }

    /**
     * 创建作者:   张勇
     * 创建日期:   2017/6/1 14:02
     * 方法介绍:   关联设计流程
     * 参数说明:
     *
     * @return
     */
    public void setFlowProcess(FlowProcess flowProcess) {
        this.flowProcess = flowProcess;
    }

    public String getReceiptTime() {
        return receiptTime == null ? "" : receiptTime;
    }

    /**
     * 到达时间
     *
     * @param receiptTime
     */
    public void setReceiptTime(String receiptTime) {
        this.receiptTime = receiptTime;
    }

    /**
     * 到达停留时间
     *
     * @return
     */
    public String getArriveTime() {
        return arriveTime == null ? "" : arriveTime;
    }

    /**
     * 到达停留时间
     *
     * @param arriveTime
     */
    public void setArriveTime(String arriveTime) {
        this.arriveTime = arriveTime;
    }

    /**
     * 办理停留时间
     *
     * @return
     */
    public String getHandleTime() {
        return handleTime == null ? "" : handleTime;
    }

    /**
     * 办理停留时间
     *
     * @param handleTime
     */
    public void setHandleTime(String handleTime) {
        this.handleTime = handleTime;
    }

    /**
     * 工作接收时间自定义参数(传递到页面)
     *
     * @return
     */
    public String getReceive() {
        return receive == null ? "" : receive;
    }

    /**
     * 工作接收时间自定义参数(传递到页面)
     *
     * @param receive
     */
    public void setReceive(String receive) {
        this.receive = receive;
    }

    /**
     * 列表查询条件
     *
     * @return
     */
    public String getMyworkconditions() {
        return myworkconditions == null ? null : myworkconditions.trim();
    }

    /**
     * 列表查询条件
     *
     * @param myworkconditions
     */
    public void setMyworkconditions(String myworkconditions) {
        this.myworkconditions = myworkconditions;
    }

    public FlowRunPrcs() {
    }

    public FlowRunPrcs(int runId, int prcsId, String userId, String prcsTime, String deliverTime, String prcsFlag, int flowPrcs, String opFlag, String topFlag, String createTime, String activeTime, int prcsDept, String parent) {
        this.runId = runId;
        this.prcsId = prcsId;
        this.userId = userId;
        this.prcsTime = prcsTime;
        this.deliverTime = deliverTime;
        this.prcsFlag = prcsFlag;
        this.flowPrcs = flowPrcs;
        this.opFlag = opFlag;
        this.topFlag = topFlag;
        this.createTime = createTime;
        this.activeTime = activeTime;
        this.prcsDept = prcsDept;
        this.parent = parent;
    }

    public FlowRunPrcs(int runId, int prcsId, String userId, String prcsTime, String deliverTime, String prcsFlag, int flowPrcs, String opFlag, String topFlag, String createTime, String activeTime, int prcsDept, String parent, String parentPrcsId) {
        this.runId = runId;
        this.prcsId = prcsId;
        this.userId = userId;
        this.prcsTime = prcsTime;
        this.deliverTime = deliverTime;
        this.prcsFlag = prcsFlag;
        this.flowPrcs = flowPrcs;
        this.opFlag = opFlag;
        this.topFlag = topFlag;
        this.createTime = createTime;
        this.activeTime = activeTime;
        this.prcsDept = prcsDept;
        this.parent = parent;
        this.parentPrcsId = parentPrcsId;
    }

    public List<FlowRunPrcs> getFlowStep() {
        return flowStep == null ? new ArrayList<FlowRunPrcs>() : flowStep;
    }

    public void setFlowStep(List<FlowRunPrcs> flowStep) {
        this.flowStep = flowStep;
    }

    public String getAllowBack() {
        return allowBack;
    }

    public void setAllowBack(String allowBack) {
        this.allowBack = allowBack;
    }

    public String getBranchCount() {
        return branchCount;
    }

    public void setBranchCount(String branchCount) {
        this.branchCount = branchCount;
    }

    public String getReadType() {
        return readType;
    }

    public void setReadType(String readType) {
        this.readType = readType;
    }

    //委托用户名
    private String otherUserName;

    public String getOtherUserName() {
        return otherUserName;
    }

    public void setOtherUserName(String otherUserName) {
        this.otherUserName = otherUserName;
    }

    public String getChuan() {
        return chuan;
    }

    public void setChuan(String chuan) {
        this.chuan = chuan;
    }

    public Integer getHandleType() {
        return handleType;
    }

    public void setHandleType(Integer handleType) {
        this.handleType = handleType;
    }

    public Map<String, Object> getHandles() {
        return handles;
    }

    public void setHandles(Map<String, Object> handles) {
        this.handles = handles;
    }

    public String getReadInfo() {
        return readInfo;
    }

    public void setReadInfo(String readInfo) {
        this.readInfo = readInfo;
    }
}